home *** CD-ROM | disk | FTP | other *** search
/ Champak 145 / (Vol 145) Dec 21 2011.iso / Games / hearts.swf / scripts / DefineSprite_638 / frame_1 / DoAction_3.as < prev    next >
Encoding:
Text File  |  2011-12-21  |  1.8 KB  |  81 lines

  1. this.resetVars = function()
  2. {
  3.    var t = this;
  4.    t.clearArrays();
  5.    t.ad = t.ads;
  6.    t.hd = t.hds;
  7.    t.grav = t.initGrav = 0.2;
  8.    t.f = 0.95;
  9.    t.score = 0;
  10.    t.gameDisplay.scoreTxt = "Score: 0";
  11.    t.gameDisplay.countDown.gotoAndStop("blank");
  12.    t.numLives = 10;
  13.    t.launcher.my = 0;
  14.    t.launcer.hoverAng = 0;
  15.    t.launcher.maxS = t.launcher.initMaxS = 3;
  16.    t.power = 0;
  17.    t.charge = false;
  18.    t.beginCharge = false;
  19.    t.chargeS = t.initChargeS = 0.7;
  20.    t.curArrow = new Array();
  21.    t.numShots = 1;
  22.    t.launcher.powerBar.gotoAndStop("blank");
  23.    t.reloading = false;
  24.    t.launcher.cupid.body.arms.anim.gotoAndPlay("reload");
  25.    t.curAng = 0;
  26.    t.hdel = 10;
  27.    t.htim = 0;
  28.    t.hmyc = t.inithmyc = 1;
  29.    t.heartSize = t.initHeartSize = 100;
  30.    t.comboCount = 0;
  31.    t.puTim = 0;
  32.    t.puDel = 200;
  33.    t.launcher.hSpuTim = 0;
  34.    t.launcher.gpuTim = 0;
  35.    t.launcher.cpuTim = 0;
  36.    t.launcher.mSpuTim = 0;
  37.    t.launcher.hSIpuTim = 0;
  38.    t.launcher.tSpuTim = 0;
  39.    t.arrowsFired = 0;
  40.    t.misses = 0;
  41.    t.heartsHit = 0;
  42.    t.fliesHit = 0;
  43.    t.accuracy = 0;
  44.    t.maxHits = 0;
  45.    t.maxPts = 0;
  46.    t.timer = 0;
  47. };
  48. this.resetVars();
  49. this.clearArrays = function()
  50. {
  51.    var t = this;
  52.    var i = t.curArrow.length - 1;
  53.    while(i >= 0)
  54.    {
  55.       t.curArrow[i].removeMovieClip();
  56.       t.curArrow.splice(i,1);
  57.       i--;
  58.    }
  59.    var i = t.arrowA.length - 1;
  60.    while(i >= 0)
  61.    {
  62.       t.arrowA[i].removeMovieClip();
  63.       t.arrowA.splice(i,1);
  64.       i--;
  65.    }
  66.    var i = t.heartA.length - 1;
  67.    while(i >= 0)
  68.    {
  69.       t.heartA[i].removeMovieClip();
  70.       t.heartA.splice(i,1);
  71.       i--;
  72.    }
  73.    var i = t.flyA.length - 1;
  74.    while(i >= 0)
  75.    {
  76.       t.flyA[i].removeMovieClip();
  77.       t.flyA.splice(i,1);
  78.       i--;
  79.    }
  80. };
  81.